<template>
  <div>
    <DynamicItem
      v-for="(item, index) in dynamic"
      :key="index"
      :index="index"
      :dynamic-item="item"
    />
    <el-button size="mini" plain round @click="returnDynamic"
      >查看全部</el-button
    >
  </div>
</template>

<script>
import DynamicItem from './DynamicItem'
export default {
  components: { DynamicItem },
  computed: {
    dynamic() {
      return this.$store.state.user.dynamic
    }
  },
  methods: {
    returnDynamic() {
      location.href = '/dynamic'
    }
  }
}
</script>

<style lang="scss" scoped>
/deep/ .el-button {
  margin-top: 8px;
  width: 100%;
}
</style>
